﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace csharp_mouse_setpos
{
    class Program
    {
        [DllImport("user32.dll")]
        static extern bool SetCursorPos(int X, int Y);

        static void Main(string[] args)
        {
            Console.Write("x: ");
            string input_x = Console.ReadLine();

            Console.Write("y: ");
            string input_y = Console.ReadLine();

            SetCursorPos(Convert.ToInt16(input_x), Convert.ToInt16(input_y));

            Console.Write("press anykey...");
            Console.ReadKey();
        }
    }
}
